﻿using Model;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using 纺织贸易管理系统;

namespace 后整理管理系统.新增窗体
{
    public partial class 测试结果 : Sunny.UI.UIForm
    {
        private TestData  Doc = new TestData ();
        public 测试结果(TestData testData )
        {
            InitializeComponent();
            Doc = testData;
        }


        private void 测试结果_Load(object sender, EventArgs e)
        {
            if (Doc!=null) 
            {
                var testdata = Connect.dbcontext.Queryable<TestData,danjumingxitable>((x,y)=>x.DocNum==y.danhao )
                    .Where((x,y) => x.DocNum == Doc.DocNum && y.yanse == Doc.Color && x.LotNo == Doc.LotNo&&x.FabricName==Doc.FabricName ).First();
                if (testdata != null)
                {
                    txtchengpingmenfu.Text = testdata.Width;
                    txtchengpingkezhong.Text = testdata.Weight;
                    txtjiefenghuayi.Text = testdata.SeamSlippage;
                    txtshilieqiangdu.Text = testdata.TearStrength;
                    txtfangshui.Text = testdata.WaterproofEffect;
                    txttestboli.Text = testdata.Divest;
                    txttestshuiya.Text = testdata.Hydraulic;
                    txttesttoushi.Text = testdata.MoisturePermeability;
                    txttestshuixi.Text = testdata.Washing;
                }
            }
        }
    }
}
